package org.eclipseuseradmin.internal.ui.wizards;

import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipseuseradmin.internal.ui.NewUserWizardRegistry;

public class WizardContentProvider implements ITreeContentProvider {

	public void dispose() {	
	}

	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
	}

	public Object[] getChildren(Object parentElement) {
		
		if (parentElement instanceof NewUserWizardRegistry) {
			
			return ((NewUserWizardRegistry) parentElement).getWizards();
		}

		return null;
	}

	public Object getParent(Object element) {
		return null;
	}

	public boolean hasChildren(Object element) {
		return false;
	}

	public Object[] getElements(Object inputElement) {
		return getChildren(inputElement);
	}

}
